-This section should be replaced, if necessary, by any special
+The following sections, as recommended, contain the more extensive
modifications of the program
that are necessary to make T<SMALL>E</SMALL>X work at a particular installation.
-It is usually best to design your change file so that all changes to
-previous sections preserve the section numbering; then everybody's version
-will be consistent with the published program. More extensive changes,
-which introduce new sections, can be inserted here; then only the index
-itself will get a new section number.
@^system dependencies@;SPMgt;
--- tex.web.orig Mon Jul 25 16:31:39 1994
+++ tex.web Mon Jul 25 18:28:20 1994
@@ -44,2 +44,3 @@
<tex2html_comment_mark>1
+<tex2html_comment_mark>2
<P>
@@ -60,2 +61,20 @@
=<tex2html_comment_mark>3
++<tex2html_comment_mark>5
+<tex2html_comment_mark>6
+<tex2html_comment_mark>7
+<tex2html_comment_mark>8
+<tex2html_comment_mark>9
+<tex2html_comment_mark>10
+<tex2html_comment_mark>11
+<tex2html_comment_mark>12
+<tex2html_comment_mark>13
+<tex2html_comment_mark>14
+
+ <tex2html_comment_mark>15
+ <tex2html_comment_mark>16
+<tex2html_comment_mark>17
+ <tex2html_comment_mark>18
+ <tex2html_comment_mark>19
+
@@ -124,2 +143,5 @@
<P>
+@d TeX_XeT_version=='--1.0' <#7#>identifies the current TeX--XeT version<#7#>
+@d TeX_XeT_copyright=='TeX--XeT Copyright (C) 1992 by Dante e.V.'
+
@ The present implementation has a long ancestry, beginning in the summer
@@ -177,5 +199,28 @@
<P>
-If this program is changed, the resulting system should not be called
-`T<SMALL>E</SMALL>X'; the official name `T<SMALL>E</SMALL>X' by itself is reserved
-for software systems that are fully compatible with each other.
+
+This program contains code for mixed left-to-right and right-to-left
+typesetting. This code is inspired by but different from T<SMALL>E</SMALL>X-<#106#><SMALL>E</SMALL>X<#106#> as
+presented by Donald~E. Knuth and Pierre MacKay in <#8#><I>TUGboat</I><#8#>
+@^Knuth, Donald Ervin@;SPMgt;
+@^MacKay, Pierre@;SPMgt;
+<#9#><B>8</B><#9#>, 14--25, 1987. Since the original program is changed, the
+resulting system is not called `T<SMALL>E</SMALL>X'; the official name `T<SMALL>E</SMALL>X' by
+itself is reserved for software systems that are fully compatible with
+each other.
+
+In order to avoid confusion with T<SMALL>E</SMALL>X-<#107#><SMALL>E</SMALL>X<#107#> the present implementation of
+mixed direction typesetting is called T<SMALL>E</SMALL>X-<#108#><SMALL>E</SMALL>X-<#108#>. It differs from T<SMALL>E</SMALL>X-<#109#><SMALL>E</SMALL>X<#109#> +in several important aspects:
+(1)~Right-to-left text is reversed explicitely by the |ship_out| routine
+and is written to a normal ḊVI file without any |begin_reflect| or
+|end_reflect| commands; (2)~a |math_node| is (ab)used instead of a
+|whatsit_node| to record the Ḃ
<R>beginL, Ḃ
<R>endL, Ḃ
<R>beginR, and
+Ḃ
<R>endR text direction primitives in order not to influence the line
+breaking algorithm for pure left-to-right text; (3)~therefore T<SMALL>E</SMALL>X-<#110#><SMALL>E</SMALL>X-<#110#> +is designed to be used instead of and not in addition to T<SMALL>E</SMALL>X and
+consequently the pool file name is not changed; (4)~right-to-left text
+interrupted by a displayed equation is automatically resumed after that
+equation; and (5)~the |valign| command code with a non-zero command
+modifier is (ab)used for the text direction primitives.
+
A special test suite called the ``ṪRIP test'' is available for
@@ -183,3 +228,3 @@
known as `T<SMALL>E</SMALL>X' [cf.~Stanford Computer Science report CS1027,
-November 1984].
+November 1984]. As a consequence of points~(1) and~(2) above T<SMALL>E</SMALL>X-<#111#><SMALL>E</SMALL>X-<#111#>
<P>
@@ -218,2 +263,7 @@
<P>
+@d TeX_XeT_banner=='This is TeX--XeT',
+ ', Version 3.141' <#16#>here we should use a substring of banner<#16#>
+ ,TeX_XeT_version <#17#>printed when T<SMALL>E</SMALL>X starts<#17#>
+
+
@ The program begins with a normal Pascal program heading, whose
@@ -1554,3 +1604,3 @@
@;SPMlt;Initialize the output...@;SPMgt;=
-wterm(banner);
+wterm(TeX_XeT_banner);
if format_ident=0 then wterm_ln(' (no format preloaded)')
@@ -1558,2 +1608,3 @@
end;
+wterm_ln(TeX_XeT_copyright); <#18#>may be omitted under certain circumstances<#18#>
update_terminal;
@@ -3069,2 +3120,6 @@
<P>
+In addition a |math_node| with |subtype;SPMgt;after| and |width=0| will be
+(ab)used to record one of the text direction primitives ( Ḃ
<R>beginL,
+Ḃ
<R>endL, Ḃ
<R>beginR, Ḃ
<R>endR ).
+
@d math_node=9 <#23#>|type| of a math node<#23#>
@@ -3072,2 +3127,13 @@
@d after=1 <#24#>|subtype| for math node that winds up a formula<#24#>
+@#
+@d L_code=2
+@d begin_L_code=L_code+before <#91#>|subtype| for Ḃ
<R>beginL `math node'<#91#>
+@d end_L_code=L_code+after <#92#>|subtype| for Ḃ
<R>endL `math node'<#92#>
+@d R_code=4
+@d begin_R_code=R_code+before <#93#>|subtype| for Ḃ
<R>beginR `math node'<#93#>
+@d end_R_code=R_code+after <#94#>|subtype| for Ḃ
<R>endR `math node'<#94#>
+@#
+@d end_LR(#)==odd(subtype(#))
+@d end_LR_type(#)==(subtype(#)+after-before)
+@d begin_LR_type(#)==(info(#)-after+before)
<P>
@@ -3544,3 +3610,4 @@
glue_node: if glue_ptr(p);SPMlt;;SPMgt;zero_glue then print_char(;SPMquot; ;SPMquot;);